
package org.madason.humanresources.datalayer;

import java.util.*;
import java.sql.*;
import java.util.Date;
import java.lang.reflect.Constructor;

/**
 * 
 */
public abstract class JobAccess
{   
    public static JobAccess getInstance()
	{
		String implName = System.getProperty("madason.dao.impl");
		if (implName == null)
			return new JobAccessOracle();
		else
		{
			try
			{
				ClassLoader classLoader = (new Job()).getClass().getClassLoader(); 
				Class cls = classLoader.loadClass("org.madason.humanresources.datalayer.JobAccess" + implName);
				Constructor ctor = cls.getConstructor(new Class[] {});
				return (JobAccess) ctor.newInstance(new Object[] {});
			}
			catch (Exception e)
			{
				e.printStackTrace();
				return null;
			}
		}
	}



    /**
     * insert new Job
     */
	public abstract void insert(Connection conn, Job bean) throws Exception;


    /**
     * delete Job
     */
    public abstract void delete(Connection conn, String primaryKey) throws Exception;


    /**
     * update new Job
     */
	public abstract void update(Connection conn, Job bean) throws Exception;





	/**
	 *  
	 */
	public abstract List<Job> findAll(Connection conn) throws Exception;


	/**
	 *  
	 */
	public abstract List<Job> findByName(Connection conn, String title) throws Exception;


	/**
	 *  
	 */
	public abstract Job findByPrimaryKey(Connection conn, String id) throws Exception;


	
}

